package org.dr.springmvcdemo.getparam;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 返回index.html页面
 * index.html必须放在templates下
 * 因为已经引入了template模板
 */
@Controller
@RequestMapping("/test")
public class IndexController {

    @RequestMapping ("/index")
    public Object index(){
        return "/index.html";
    }
    @RequestMapping("/returnData")
    @ResponseBody
    public String returnData(){
        return "该⽅法返回数据";
    }
}
